#ifndef _OC_VOLUME_OBJECT_H__
#define _OC_VOLUME_OBJECT_H__

#include "VolumeUtil.h"
#include "OCMain/Image.h"

namespace OCPP
{
	namespace Volume
	{
		class _volumeExport CVolumeObject
		{
		public:
			CVolumeObject();
			virtual ~CVolumeObject();
			virtual bool convert(String filename) { return false; }
			virtual bool convert(std::istream& sstream) { return false; }

			CVolumeMeta& getMeta() { return mVolumeMeta; }
			void writeToW3DM(String filename);
			void writeToStream(std::ostream& os);
			void setUint8Image(std::shared_ptr<Image> image);
		protected:
			std::shared_ptr<Image> _CreateVolumeImage(int s, int t, int r, PixelFormat pixelFormat = PF_BYTE_RGBA);
			float width_in_meter(float lat_in_degree, float width_in_degree);
			float height_in_meter(float height_in_degree);
			CVolumeMeta	mVolumeMeta;
			std::shared_ptr<Image>    mUint8Image;
		};
	}
}

#endif
